const log = require('./common')

//1.判断对象为空 (没有固定答案,看需求选择不同方法,不可枚举算不算空?Symbol算不算?)
let objkey = Symbol();
let obj = {[objkey]:1};

Object.defineProperty(obj,'property1',{
    value:1,
    enumerable:false,
})

function isNull(obj){
  return Reflect.ownKeys(obj).length === 0;             //无论键、无论Symbol
  return Object.keys(obj).length === 0;                 //可枚举的键组成的数组
  return Object.getOwnPropertyNames(obj).length === 0;  //包括不可枚举,但不包括Symbol为键的属性 可+getOwnPropertySymbols
}

log(isNull(obj));




